<?php 
	$data = $this->data;
	$i = 0;
?>
<div id="list_place">
	<?php foreach ($data as $item) {?>
	<div class="item_place">
		<h3 class="title_place"><?php echo $item['name']; ?></h3>
		<p class="address_place"><?php echo $item['address']; ?></p>
		<p class="phone_place"><?php echo $item['phone']; ?></p>
		<div id="item-place-<?php echo $item['id'];?>" class="place-item">
			<?php echo $item['code']; ?>
		</div>
		<?php
			if($i == 0) 
				$i = $item['id'];
		?>
	</div>
	<?php }?>
</div>
<div id="show_map">

</div>
<script>
$(document).ready(function(){
	$(".place-item").hide();
	$("#show_map").html($("#item-place-<?php echo $i;?>").html());
	$(".item_place").click(function(){
		$("#show_map").html($(this).children(".place-item").html());
	});
});
</script>